import {default as api} from '../../utils/request'
const app ={
  state: {
    webInfo:{}
  },
  mutations: {
    SET_WEB_INFO: (state, webInfo) => {
      state.webInfo = webInfo
    },
  },
  actions: {
// 获取网站信息
    GetWebInfo({commit, state}) {
      return new Promise((resolve, reject) => {
        api({
          url: '/eduservice/indexfront/getWebInfo',
          method: 'get'
        }).then(data => {
          //储存信息
          commit('SET_WEB_INFO', data);
          // console.log(111333,data)
          resolve(data)
        }).catch(error => {
          reject(error)
        })
      })
    }
  }
}
export default app
